<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>练习</title>
</head>
<body>
<div id="app">
    <h1>{{message}}</h1>
    图片名: <input type="text" v-model="img_path"><br/><br/>
    <img :src="img_path" alt="" :width="img_width">
</div>
<script src="vue.js"></script>
<script>
    let vm = new Vue({
        el: "#app",
        data: {
            message: "切换图片",
            img_path: "cat.png",
            img_width: "150px"
        }
    })
</script>
</body>
</html>